import type { Request, Response } from 'express';

function apiRoutesList(_: Request, res: Response) {
    res.send({
        code: 200,
        message: '提交成功',
        data: [
            {
                "id": "dashboard-root",
                "parentId": "ant-design-pro-layout",
                "path": "/dashboard",
                "name": "dashboard",
                "icon": "DashboardOutlined", // 修正图标名（对应 Ant Design 图标）
                "children": [ // 用 routes 替代 children
                    {
                        "id": "dashboard-redirect",
                        "parentId": "dashboard-root",
                        "path": "/dashboard",
                        "redirect": "/dashboard/analysis",
                         url: "/dashboard/analysis",
                        "hideInMenu": true // 隐藏重定向路由
                    },
                    {
                        "id": "dashboard-analysis",
                        "parentId": "dashboard-root",
                        "name": "analysis",
                        "icon": "SmileOutlined",

                        "path": "/dashboard/analysis",
                        url: "/dashboard/analysis",
                        "componentPath": "./dashboard/analysis" // 修正路径前缀
                    },
                    {
                        "id": "dashboard-monitor",
                        "parentId": "dashboard-root",
                        "name": "monitor",
                        "icon": "SmileOutlined",
                        "path": "/dashboard/monitor",
                        url: "/dashboard/monitor",
                        "componentPath": "./dashboard/monitor" // 修正路径前缀
                    }
                ]
            },
         
        ]
    });
}
export default {
    'POST  /api/routesList': apiRoutesList
};

